<template>
	<view class="create-container container">
		<view class="item-cls" @click="goToHandler(1)">
			<view class="img-cls">
				<image src="../../static/image/text.png" mode=""></image>
			</view>
			<view>
				<view class="title">文字投票</view>
				<view class="desc">选项为纯文字，使用方便，简单快速</view>
			</view>

		</view>
		<view class="item-cls" @click="goToHandler(2)">
			<view class="img-cls">
				<image src="../../static/image/pic.png"></image>
			</view>
			<view>
				<view class="title">图文投票</view>
				<view class="desc">选项为图片，可以上传图片进行投票</view>
			</view>

		</view>
	</view>
</template>

<script setup>
import {
		useRouter,
	} from '@/utils/index.js'
	
	const goToHandler=(type)=>{
		if(type==1){
			useRouter('/pages/createWordVote/createWordVote',{type:1})
		}
		else{
			useRouter('/pages/createPicVote/createPicVote',{type:2})
		}
	}
</script>

<style lang="less">
	.create-container {
		.item-cls{
			display: flex;
			margin-bottom: 40rpx;
			padding: 30rpx;
			background: white;
			align-items: center;
			border-radius: 5px;
			.img-cls{
				display: flex;
				align-items: center;
			}
			image{
				width:100rpx;
				height: 100rpx;
				margin-right: 40rpx;
			}
			.title{
				font-size: 24px;
				font-weight: bolder;
			}
			.desc{
				margin-top: 16rpx;
				font-size: 14px;
			}
		}
	}
</style>